package cn.sumpu.app.coolsk.biz;

import cn.sumpu.app.coolsk.domain.*;
import cn.sumpu.app.coolsk.exception.AppBusinessException;
import cn.sumpu.toolkit.common.page.PageModel;

public interface InfoBiz {

	/**
	 * author BruceZhang
	 * @param info
	 * 添加信息
	 * @throws AppBusinessException
	 */
	Info addInfo(Info info)throws AppBusinessException;
	
	/**
	 * author BruceZhang
	 * @param title			标题
	 * @return	查询信息
	 * @throws AppBusinessException
	 */
	PageModel getInfo(String title, Integer pageSize, Integer page)throws AppBusinessException;
	//查询信息总条数
	Integer getInfoCount(String title)throws AppBusinessException;
	//删除信息
	void deleteInfo(String id)throws AppBusinessException;
	//更新信息
	void updateInfo(Info info)throws AppBusinessException;
	/**
	 * author BruceZhang
	 * @param id	信息ID
	 * @return	通过ID取得某条信息
	 * @throws AppBusinessException
	 */
	Info getInfoById(String id)throws AppBusinessException;
	/**
	 * author BruceZhang
	 * @param id	信息ID
	 * @param comments	要加多少浏览次数
	 * @throws AppBusinessException
	 */
	void updateInfoViews(String id, Integer views)throws AppBusinessException;
	/**
	 * author BruceZhang
	 * @param id	信息ID
	 * @param comments	要加多少点评量
	 * @throws AppBusinessException
	 */
	void updateInfoComments(String id, Integer comments)throws AppBusinessException;
	
}
